package server;
import java.io.IOException;
import java.net.Socket;
import java.net.SocketException;

import com.lloseng.ocsf.server.AbstractServer;
import com.lloseng.ocsf.server.ConnectionToClient;

/**
 * manage client when connected to server
 * @author Termchai 5510546042, Eknarin 5510546239
 *
 */
public class ConnectToClient extends ConnectionToClient {

	protected ConnectToClient(ThreadGroup group, Socket clientSocket,
			AbstractServer server) throws IOException {
		super(group, clientSocket, server);
		// TODO Auto-generated constructor stub
	}

	@Override
	protected boolean handleMessageFromClient(Object message) {
		System.out.println("client send this : " + message.toString());
		return true;
	}

	public void talk()
	{
		try {
			sendToClient("TEST");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
}
